package com.kerpow.KSheet;

import android.app.Activity;
import android.os.Bundle;
import android.widget.CheckBox;
import android.widget.Spinner;

public class Settings extends Activity {

	CheckBox _snappy;
	Spinner _menuMethod;
	
		
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.settings);
		
		
		_snappy = (CheckBox) findViewById(R.id.settingsSnap);
		_menuMethod = (Spinner) findViewById(R.id.settingsContextMenu);
		
		_snappy.setChecked(GlobalSettings.snappyPowers);
		_menuMethod.setSelection(GlobalSettings.menuActivation);
	}

	@Override
	protected void onPause() {		
		GlobalSettings.snappyPowers =  _snappy.isChecked();
		GlobalSettings.menuActivation =  _menuMethod.getSelectedItemPosition();
		
		GlobalSettings.Save(this);
		
		super.onPause();
	}

}
